<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>错误信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="1055209525">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "1055209525";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("error.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建错误信息"
  			,"inport":"导入错误信息"
  			,"update":"修改错误信息"
  			,"detail":"错误信息详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		if($("#seContent").size()>0){
			 //构造编辑页srvError.seContent为html编辑控件
			 KE.init({
				id : "seContent",
				width : "750px",height : "300px", 
				imageUploadJson : window["uploadUrl"]
			 });
			 KE.create("seContent");
		 }
		 
	$("#errorForm").form({
		"":function(){}
		,"srvError.seId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvError.seTitle":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "错误标题不能为空";
			}
			if(el.value.length>512 && el.value.indexOf("[*]")==-1)
				return "错误标题最大长度为512个字符";
		}
		,"srvError.seContent":function(el){
			if($("#seContent").get(0))
			 	KE.sync("seContent");		 
		}
		,"srvError.seFlag":function(el){
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "标识最大长度为32个字符";
		}
		,"srvError.seCount":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"srvError.seUpdateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"srvError.seAddTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"srvError.seStatus":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="SrvError" id="errorForm" name="errorForm" target="jsoniframe" action="error.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写错误信息相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("seId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seId"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seId"))))}}
	{{lz.set("seId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seId}}
	<dl lz:if="{{seId_editable||seId_readonly}}" class="seId hidden " major  ref="seId">
		<dt>编　　号:</dt>
		<dd lz:if="{{seId_editable}}" input="hidden">
			<lz:block lz:if="{{srvError$seId}}">
				{{srvError$seId}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seId}}">
			<input type="hidden" value="{{lz.htm(srvError.seId)}}" name="srvError.seId" id="seId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seId">{{srvError.seId}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seId$||srvError.seId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seId}}
	{{lz.set("seTitle_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seTitle"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seTitle"))))}}
	{{lz.set("seTitle_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seTitle}}
	<dl lz:if="{{seTitle_editable||seTitle_readonly}}" class="seTitle   wider" major  ref="seTitle">
		<dt>错误标题:</dt>
		<dd lz:if="{{seTitle_editable}}" input="textarea">
			<lz:block lz:if="{{srvError$seTitle}}">
				{{srvError$seTitle}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seTitle}}">
		 	<textarea class="input wide"  id="seTitle" name="srvError.seTitle" rows="5">{{srvError.seTitle}}</textarea>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入错误信息的错误标题</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seTitle_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(srvError.seTitle$||srvError.seTitle)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seTitle}}
	{{lz.set("seContent_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seContent"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seContent"))))}}
	{{lz.set("seContent_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seContent}}
	<dl lz:if="{{seContent_editable||seContent_readonly}}" class="ribs seContent   wider" major  ref="seContent">
		<dt>错误内容:</dt>
		<dd lz:if="{{seContent_editable}}" input="html">
			<lz:block lz:if="{{srvError$seContent}}">
				{{srvError$seContent}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seContent}}">
		    <textarea class="input wide html"  id="seContent" name="srvError.seContent" style="height:300px;visibility:hidden;">{{srvError.seContent}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入错误信息的错误内容</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seContent_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(srvError.seContent$||srvError.seContent)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seContent}}
	{{lz.set("seFlag_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seFlag"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seFlag"))))}}
	{{lz.set("seFlag_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seFlag}}
	<dl lz:if="{{seFlag_editable||seFlag_readonly}}" class="ribs seFlag  " major  ref="seFlag">
		<dt>标　　识:</dt>
		<dd lz:if="{{seFlag_editable}}" input="text">
			<lz:block lz:if="{{srvError$seFlag}}">
				{{srvError$seFlag}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seFlag}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="srvError.seFlag" id="seFlag"  value="{{lz.htm(srvError.seFlag)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入错误信息的标识</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seFlag_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seFlag">{{srvError.seFlag}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seFlag$||srvError.seFlag)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seFlag}}
	{{lz.set("seCount_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seCount"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seCount"))))}}
	{{lz.set("seCount_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seCount}}
	<dl lz:if="{{seCount_editable||seCount_readonly}}" class="ribs seCount  " major  ref="seCount">
		<dt>错误次数:</dt>
		<dd lz:if="{{seCount_editable}}" input="number">
			<lz:block lz:if="{{srvError$seCount}}">
				{{srvError$seCount}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seCount}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="srvError.seCount" id="seCount"  value="{{lz.htm(srvError.seCount)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入错误信息的错误次数</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seCount_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seCount">{{srvError.seCount}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seCount$||srvError.seCount)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seCount}}
	{{lz.set("seUpdateTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seUpdateTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"seUpdateTime"))))}}
	{{lz.set("seUpdateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seUpdateTime}}
	<dl lz:if="{{seUpdateTime_editable||seUpdateTime_readonly}}" class="seUpdateTime  " major  ref="seUpdateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{seUpdateTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvError$seUpdateTime}}">
				{{srvError$seUpdateTime}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seUpdateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvError.seUpdateTime" id="seUpdateTime"  value="{{srvError.seUpdateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择错误信息的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seUpdateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seUpdateTime">{{srvError.seUpdateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seUpdateTime$||srvError.seUpdateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seUpdateTime}}
	{{lz.set("seAddTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seAddTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"seAddTime"))))}}
	{{lz.set("seAddTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seAddTime}}
	<dl lz:if="{{seAddTime_editable||seAddTime_readonly}}" class="seAddTime  " major  ref="seAddTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{seAddTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvError$seAddTime}}">
				{{srvError$seAddTime}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seAddTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvError.seAddTime" id="seAddTime"  value="{{srvError.seAddTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择错误信息的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seAddTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seAddTime">{{srvError.seAddTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seAddTime$||srvError.seAddTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seAddTime}}
	{{lz.set("seStatus_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"seStatus"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"seStatus"))))}}
	{{lz.set("seStatus_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$seStatus}}
	<dl lz:if="{{seStatus_editable||seStatus_readonly}}" class="seStatus  " major  ref="seStatus">
		<dt>状　　态:</dt>
		<dd lz:if="{{seStatus_editable}}" input="select">
			<lz:block lz:if="{{srvError$seStatus}}">
				{{srvError$seStatus}}
			</lz:block>
			<lz:block lz:if="{{!srvError$seStatus}}">
		 	<select class="narrow" id="seStatus" name="srvError.seStatus">
		 		<option value="">请选择</option>
				<option value="1" selected='{{srvError.seStatus=="1"?"selected":""}}'>正常</option>
				<option value="0" selected='{{srvError.seStatus=="0"?"selected":""}}'>无效</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择错误信息的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{seStatus_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="seStatus">{{srvError.seStatus}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvError.seStatus$||srvError.seStatus)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$seStatus}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{srvError.seId}}" name="srvError.seId" id="seId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/systematic/error.edit.html?edittype=update&id={{srvError.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteError('{{srvError.id}}','{{srvError.seTitle}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/systematic/error.edit.html",document.title,"/admin//images/icons/2008825642250778034.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/systematic/error.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除错误信息
	**/
	function deleteError(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除错误信息",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/systematic/error.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>